#[cfg(test)]
mod test;

use mimalloc::MiMalloc;
use ntex::web;

#[global_allocator]
static GLOBAL: MiMalloc = MiMalloc;

#[web::get("/")]
async fn hello() -> impl web::Responder {
  web::HttpResponse::Ok().body("ok")
}
#[web::get("/xxx")]
async fn hello_xxx(req_body: String) -> impl web::Responder {
  web::HttpResponse::Ok().body(req_body)
}
#[ntex::main]
async fn main() -> std::io::Result<()> {
	// 
    web::HttpServer::new(|| {
	web::App::new()
	    .service(hello)
		.service(hello_xxx)
    }).bind(("0.0.0.0", 8080))?
	.run()
	.await
}
